# !/usr/bin/env
# coding: utf-8
from urllib import parse,request

i = 0
times = 500
req = request.Request("http://192.168.123.126:8080/PROVIDER1/person/222")
for a in range(times):
    try:
        res = request.urlopen(req)
    except:
        i = i+1

print("失败率: %d%%" % (100 * i/times))   